<template>
  <table class="mailTable" :style="styleObject">
    <tr style="font-size: 0.16rem;font-weight: 600;background: rgb(66, 79, 90);color: white;">
      <td :colspan="2">工序</td>
      <td>工艺参数名称</td>
      <td>上限</td>
      <td>下限</td>
    </tr>
    <!-- <tr v-for="(item,index) of tableData" :key="item.label">
      <td rowspan="3" v-if="index < 1">哈哈</td>
      <td v-if="index > 2">哈哈</td>
      <td class="column">{{item.label}}</td>
      <td><el-input-number v-model="item.value1" :precision="5" :step="0.1"></el-input-number></td>
      <td><el-input-number v-model="item.value2" :precision="5" :step="0.1"></el-input-number></td>
    </tr> -->
    <template v-for="(valueItem, keyItem, indexItem) in tableData">
      <template v-for="(value, key, idx) in valueItem">
        <tr v-for="(item, _index) of value" :key="item.Label">
          <!-- <td :rowspan="valueItem['pp'].length + valueItem['sqp'].length" v-if="_index === 0">{{keyItem}}</td> -->
          <td :rowspan="valueItem['pp'].length + valueItem['sqp'].length" v-if="idx === 0 && _index === 0" style="background: #dddfe2;">{{keyItem}} </td>
          <td :rowspan="value.length" v-if="_index === 0" style="background: #e3e8ec;">{{item.suiwo}}</td>
          <td class="column">{{item.Label}}</td>
          <td><el-input-number v-model="item.LB" :precision="5" :step="0.1"></el-input-number></td>
          <td><el-input-number v-model="item.RB" :precision="5" :step="0.1"></el-input-number></td>
        </tr>
      </template>
    </template>
  </table>
</template>

<script>
export default {
  data () {
    return {
      num: '',
      styleObject: {}
    }
  },
  props: ['tableData', 'tableStyle', 'showByRow'],
  created () {
    this.styleObject = this.tableStyle
  }
}
</script>

<style>
.mailTable, .mailTable tr, .mailTable tr td{ border:1px solid rgba(116, 124, 130, 0.39); text-align: center;}
.mailTable {font-size: 0.14rem; color: #71787E; }
.mailTable tr td{ border:1px solid rgba(116, 124, 130, 0.39); width: 1.5rem; height: 0.35rem; line-height: 0.35rem; box-sizing: border-box; padding: 0 10px; }
.mailTable tr td.column { background-color: #EFF3F6; color: #393C3E; }
.mailTable .el-input-number {
  margin: 0.05rem 0;
}
</style>
